package ch.usi.inf.pf2.node;

import ch.usi.inf.pf2.cell.NumericValue;
import ch.usi.inf.pf2.cell.Value;
import ch.usi.inf.pf2.node.Constant;
import ch.usi.inf.pf2.node.Multiplication;
import junit.framework.TestCase;
/**
 * A MultiplicationTest ,it tests if Multiplication class works or not.
 * 
 * @author Elham.menzer@gmail.com
 */


public class MultiplicationTest extends TestCase {
	


		public void testCompute(){
			//(1*4)*5
			Node n =new Multiplication(
					new Multiplication(
							new Constant (1),
							new Constant (4)
							),
							new Constant(5));
			Value  v = n.evaluate();
			assertEquals(20.0,((NumericValue)v).get());
							
		}
			

	}